<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div>
    <img th:src="'/images/'+${p.image}" width="200" height="200"><br>
    <span th:text="${p.name}"></span><br>
    单价：<span th:text="'￥'+${p.price}"></span><br>
    评论：<span th:text="${p.comNum}+'条'"></span><br>
    <a th:href="@{/product/findByItem}">返回首页</a>
</div>

<table border="1" width="60%">
    <thead><tr><th>评论人</th><th>评论</th></tr></thead>
    <tbody>
    <tr th:each="c:${p.comList}">
        <td th:text="${c.user.uniName}"></td>
        <td th:text="${c.content}"></td>
    </tr>
    </tbody>
</table>

<form action="/comment/add">
    <input type="hidden" name="productId" th:value="${p.id}"><br>
   请输入评论： <input type="text" name="content">
    <input type="submit" value="评论">
</form>


</body>
</html>